import {useMemo} from 'react';
import {useWindowDimensions} from 'react-native';

export default () => {
  const {width, height} = useWindowDimensions();
  const scale = useMemo(() => {
    const Wp = width / 1280,
      Hp = height / 800;

    return Wp > Hp ? Hp : Wp;
  }, [width, height]);
  return scale;
};
